IGNITE-12701 : Disallow silent deactivation in CLI and REST.#7471
Conversation
…within the job, not on client node.
…within the job, not on client node.
new IgniteCluster#state(ClusterState, boolean force)
| ctx.localNodeId(), | ||
| null, | ||
| ClusterState.active(clusterState.state()) ? clusterState.state() : ACTIVE, | ||
| true, |
There was a problem hiding this comment.
It's not clear why we force deactivation here.
There was a problem hiding this comment.
It's not clear why we force deactivation here.
All previous internal changes of cluster state were forced. Thus, all current internal changes of cluster are considered forced. Only the exceptions are the user commands being translated to not-forced internal calls without flag ‘force’ passed.
|
Hello @nizhikov , Please don't get me wrong, but... |
Hi, @sk0x50 This merge doesn't contain mentioned issues IGNITE-12597, IGNITE-12646, and IGNITE-12703 at all. That was just wrong comments in my branch. |
|
Hello @Vladsz83 ,
Yes, I know that, and you are right. Thanks, |
|
Hello @sk0x50 First of all, this is my fault, but the reason for the fault is GitHub bug. But after pushing the "merge" button I've got "We can't merge your PR" error message and "Try again" button. After pushing "Try again" we got what we got - merge with the default commit message. Sorry, for that. |
|
Hello @nizhikov, Ok, got it! Thank you for the clarification. Thanks, |
Changes in public behavior:
Involved optional flag 'force' for control.sh (bat) with --deactivate and --set-sate:
control.sh --deactivate --force
control.sh --set-state INACTIVE --force
Involved optional parameter 'force=true|false' for REST cluster state requests:
http://127.0.0.1:8092/ignite?cmd=deactivate&force=true
http://127.0.0.1:8092/ignite?cmd=inactive&force=true
http://127.0.0.1:8092/ignite?cmd=setstate&state=INACTIVE&force=true
Major code changes: